"use strict";jQuery(document).ready(function(n){n.faq_woocommerce={ajax_url:"",init:function(){n(".ffw-comment-reply-form").hide(),n(document).on("click",".ffw-comment-reply-button",this.addCommentReplyData),n(document).on("click",".ffw-comment-header",this.faqCommentSectionToggle),n(document).on("click",".ffw-btn-expand-collapse-all",this.faqExpandCollapseToggle),n(document).on("show_variation","form.variations_form",this.onChangeVariations)},addCommentReplyData:function(o){var a=n(".ffw_product_id_for_comment").val();n(this).closest(".comment").find(".ffw-comment-reply-form").fadeToggle(),n(this).closest(".comment").find(".ffw_product_id_for_comment_reply").val(a)},faqCommentSectionToggle:function(){n(this).closest(".ffw-comment-wrapper").find(".ffw-comment-box").slideToggle()},faqExpandCollapseToggle:function(o){o.preventDefault();var o=n(this).parent(".ffw-main-wrapper").find(".ffw-wrapper");o.hasClass("ffw-classic-layout")||o.hasClass("ffw-whitish-layout")||o.hasClass("ffw-pop-layout")?n(".ffw-classic-answer").hasClass("ffw-hide")?n(".ffw-classic-answer").removeClass("ffw-hide").slideUp():n(".ffw-classic-answer").addClass("ffw-hide").slideDown():o.hasClass("ffw-trip-layout")&&((o=n("details")).attr("open")?o.removeAttr("open"):o.attr("open",!0))},onChangeVariations:function(o,a){var e;a.variation_id&&(console.log("variation product"+a.variation_id),console.log(ffw_public_js.nonce),a=a.variation_id,e=ffw_public_js.nonce,wp.ajax.post("ffw_search_variation_faqs",{nonce:e,faq_data:{variation_id:a}}).then(function(o){console.log(o),o.content&&n("#ffw-main-wrapper").replaceWith(o.content)}).fail(function(o){console.log("erorr......."),console.log(o)}))}},n.faq_woocommerce.init()}) ;